package com.fangqiang.sprint_boot_web1.mybatisinterceptor;

import com.fangqiang.sprint_boot_web1.mybatisplus.Animal;
import com.fangqiang.sprint_boot_web1.mybatisplus.AnimalMapper;
import com.fangqiang.sprint_boot_web1.mybatisplus.AnimalServer;
import jakarta.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;

@org.springframework.stereotype.Service
public class Service {

    @Autowired
    private AnimalMapper animalMapper;

    @PostConstruct
    public void init(){
        Animal animal1 = new Animal();
        animal1.id=1;
        animal1.age=21;
        animal1.name="dog";
        int i = animalMapper.updateById(animal1);
        System.out.println();
    }
}
